package com.zh.socket.common.bean;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @author magic
 *
 * @param <T>实体类
 * @param <PK> 主键类型
 * @param <E>Example类型
 */
public interface BaseMapper<T extends AbsBaseModel, PK, E> {
    int countByExample(E example);

    int deleteByExample(E example);

    int deleteByPrimaryKey(PK id);

    int insert(T record);

    int insertSelective(T record);

    List<T> selectByExample(E example);

    T selectByPrimaryKey(PK id);

    int updateByExampleSelective(@Param("record") T record, @Param("example") E example);

    int updateByExample(@Param("record") T record, @Param("example") E example);

    int updateByPrimaryKeySelective(T record);

    int updateByPrimaryKey(T record);
}

